package o2o.dao.PO.policy;


import java.util.HashSet;
import java.util.Set;

/**
 * 投保状态
 */
public class INSURANCE_STATUS {


    /**
     * 本系统中订单投保状态
     */
    public static class SELF_ORDER_INSURANCE_STATUS {
//        public static final int EXIST_ERR = -1;     // 投保存在异常
//        public static final int INSURANCE_EXIST_ERR = -9;     // 存在异常详情请查看
    }

    /**
     * 第三方系统状态
     */
    public static class THREAD_ORDER_INSURANCE_STATUS {
        public static final int INSURANCE_EXIST_ERR = -1;    // 投保认证失败
        public static final int INSURANCE_SELF_UNDEAL = 0;    // 发起投保后 本系统未处理
        public static final int INSURANCE_DEALING = 1;        // 投保处理中 或未投保
        public static final int INSURANCE_FAIL = 2;           // 投保失败
        public static final int INSURANCE_SUCCESS = 3;        // 投保成功
        public static final int BACK_DEALING = 4;             // 退保处理中
        public static final int BACK_FAIL = 5;                // 5:退保失败
        public static final int BACK_SUCCESS = 6;             // 6:退保成功
        public static final int WAIT_FOR_PAY = 7;             // 7: 待支付
    }

    public static Set<Integer> waitForDealStatusSet = new HashSet<>();

    public static Set<Integer> alreadyDealStatusSet = new HashSet<>();

    static {
        waitForDealStatusSet.add(THREAD_ORDER_INSURANCE_STATUS.INSURANCE_DEALING);
        waitForDealStatusSet.add(THREAD_ORDER_INSURANCE_STATUS.BACK_DEALING);

        alreadyDealStatusSet.add(THREAD_ORDER_INSURANCE_STATUS.INSURANCE_EXIST_ERR);
        alreadyDealStatusSet.add(THREAD_ORDER_INSURANCE_STATUS.INSURANCE_FAIL);
        alreadyDealStatusSet.add(THREAD_ORDER_INSURANCE_STATUS.INSURANCE_SUCCESS);
        alreadyDealStatusSet.add(THREAD_ORDER_INSURANCE_STATUS.BACK_FAIL);
        alreadyDealStatusSet.add(THREAD_ORDER_INSURANCE_STATUS.BACK_SUCCESS);
    }


}
